<?php
FLEA::loadClass('Controller_Base');
class Controller_ProductWords extends Controller_Base {
	var $_modelProductWords;
	var $_modelProductClasses;
	function Controller_ProductWords() {
		$this->_modelProductWords = & FLEA::getSingleton("Model_ProductWords");
		$this->_modelProductClasses = & FLEA::getSingleton("Model_ProductClasses");		
	}
	function actionIndex() {
		$pcid = (int)$_GET['pcid'];
		$pcidstr = $this->_modelProductClasses->getClasses($pcid);
		$page = isset($_GET['page']) ? (int)$_GET['page'] : 0;
		FLEA::loadClass('FLEA_Helper_Pager');
		$table =& $this->_modelProductWords->getTable();
		$pager =& new FLEA_Helper_Pager($table, $page,20,"pcid in ($pcidstr)","created desc");
		$pk = $table->primaryKey;
		$rowset = $pager->findAll();
		$this->_setBack();
		include(TPL_DIR . '/product_words.php');
	}
	function actionProductWords() {
	}
	function actionAdd() {
//		include(TPL_DIR . '/product_add.php');
	}
}
?>